import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import toast from 'components/common/toast'
import store from './store'
import echarts from 'echarts'
import bus from './utils/bus'
import AmapVue from '@amap/amap-vue'
import nodata from 'components/no-data/nodata'
import MPagination from 'components/common/m-pagination/MPagination'
import VDistpicker from 'v-distpicker'
import Print from 'vue-print-nb'
import VueClipboard from 'vue-clipboard2'
import common from './utils/common'
import { MessageBox, Message } from "element-ui"
import { Toast } from 'vant'

Vue.config.productionTip = false

//挂在 Vue 实例上
Vue.prototype.$common = common;
Vue.prototype.$echarts = echarts
Vue.prototype.$messageBox = MessageBox
Vue.prototype.$message = Message
Vue.prototype.$toastVant = Toast

AmapVue.config.key = 'f8e9d201cb5f8f2ca0b91179b6d77b6f' // TODO: 测试用的高德地图key，正式上线需要申请正式的

Vue.use(AmapVue)
Vue.use(toast)
Vue.use(bus)
Vue.use(VueClipboard)
Vue.use(Print); //注册打印插件

//挂载组件
Vue.component('nodata', nodata)
Vue.component('MPagination', MPagination)
Vue.component('v-distpicker', VDistpicker)

new Vue({
    render: h => h(App),
    router,
    store
}).$mount('#app')
